package io.linfeng.modules.admin.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;
import io.linfeng.common.vo.AppChildrenCommentResponse;
import io.linfeng.common.vo.CommentCountResponse;
import io.linfeng.common.utils.AppPageUtils;
import io.linfeng.common.utils.PageUtils;
import io.linfeng.modules.admin.entity.AppUserEntity;
import io.linfeng.modules.admin.entity.CommentEntity;
import io.linfeng.modules.app.param.DelCommentForm;

import java.util.List;
import java.util.Map;

/**
 * 
 *
 * @author linfeng
 * @email 2445465217@qq.com
 * @date 2022-01-24 21:29:22
 */
public interface CommentService extends IService<CommentEntity> {

    PageUtils queryPage(Map<String, Object> params);

    Integer getCountByPostId(Integer id);

    List<CommentCountResponse> getAllCountByPostId(List<Integer> id);

    AppPageUtils queryCommentPage(Integer postId, Integer page);

    List<CommentEntity> getByPid(Long pid);

    void del(DelCommentForm request, AppUserEntity user);

    void deleteByAdmin(List<Long> list);

    JSONObject getCommentListInCache(Integer postId);

    void updateCommentById(CommentEntity comment);

    List<AppChildrenCommentResponse> remainComment(Long id);
}

